package com.hyts.rxjava.bus.event;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.rxjava.bus.domain
 * author:Libo/Alex
 * create-date:2019-06-27 17:36
 * email:liboware@gmail.com
 * description:此类主要用于: abstract 抽象的事件操作服务类型
 */

@NoArgsConstructor
@AllArgsConstructor
public abstract class AbstractEvent<P,R> implements Event<P,R>{

    /**
     * 事件标识
     */
    @Getter
    @Setter
    private Long eventToken;

    /**
     * 事件名称
     */
    @Getter
    @Setter
    private String eventName;

    /**
     * 事件数据
     */
    @Getter
    @Setter
    private Object eventData;


    public AbstractEvent(Long eventToken, String eventName) {
        this.eventToken = eventToken;
        this.eventName = eventName;
    }

    public AbstractEvent(Long eventToken) {
        this.eventToken = eventToken;
    }

    public AbstractEvent(String eventName) {
        this.eventName = eventName;
    }
}
